package com.yuyou.fn.settlement.service;

import com.alibaba.fastjson.JSONObject;
import com.yuyou.fn.settlement.entity.PosPayRecord;
import com.github.wens.framework.service.ISuperService;

/**
 *
 * PosPayRecord 表数据服务层接口
 *
 */
public interface IPosPayRecordService extends ISuperService<PosPayRecord,Long> {


    boolean updateStatus(Long requestPayId, PosPayRecord.STATUS oldStatus, PosPayRecord.STATUS newStatus);

    boolean isPayingForOrder(Long busOrderId);

    boolean isSuccessPay(Long requestPayId);

    boolean updatePayStatus(Long requestPayId, JSONObject posInfo);

    /**
     * 撤销已经扫码记录
     * @param busOrderId
     * @return
     */
    boolean cancel(Long busOrderId);

    /**
     * 是否有锁定余额
     * @param busOrderId
     * @return
     */
    boolean isLockBalance(Long busOrderId);

}